package cn.jingzhuan.fm.mvp.model

import cn.jingzhuan.fm.mvp.contract.FMAudioListContract
import cn.jingzhuan.fm.network.FMApiService
import cn.jingzhuan.fm.network.json.JsonResponse
import cn.jingzhuan.fm.pojo.FMAudio
import io.reactivex.Flowable
import javax.inject.Inject


class FMAudioListModel @Inject constructor(val fmApiService: FMApiService) : FMAudioListContract.Model{

    override fun getAudioList(page: Int, limit: Int, isReverse: Boolean,albumId: String): Flowable<JsonResponse<List<FMAudio>>>  {
        return fmApiService.audioList(page,limit,if(isReverse) 1  else 0 ,albumId)
    }

}